home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16429 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.0 KB

  1. Path: fido.asd.sgi.com!news
  2. From: austern@isolde.mti.sgi.com (Matt Austern)
  3. Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.edu
  4. Subject: Re: ANSI C and POSIX (was Re: C/C++ knocks the crap out of Ada)
  5. Followup-To: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.edu
  6. Date: 10 Apr 1996 17:34:41 GMT
  7. Organization: SGI
  8. Message-ID: <AUSTERN.96Apr10103441@isolde.mti.sgi.com>
  9. References: <JSA.96Feb16135027@organon.com> <dewar.828936837@schonberg>
  10.     <4kb2j8$an0@solutions.solon.com> <4kbrt5$k3h@mulga.cs.mu.OZ.AU>
  11.     <4kcer3$mi4@solutions.solon.com> <4kdnvq$3n8@mulga.cs.mu.OZ.AU>
  12.     <4kgmgu$jm@galaxy.ucr.edu>
  13. Reply-To: austern@mti.sgi.com
  14. NNTP-Posting-Host: isolde.mti.sgi.com
  15. In-reply-to: thp@cs.ucr.edu's message of 10 Apr 1996 16:10:06 GMT
  16.  
  17. In article <4kgmgu$jm@galaxy.ucr.edu> thp@cs.ucr.edu (Tom Payne) writes:
  18.  
  19. > The problem shows up in real situations: In C++ AFAIK there is no
  20. > efficient way for an exception at the hardware level to generate an
  21. > exception (in the C++ sense) on the part of the running program -- the
  22. > running must poll a volatile atomic variable to see if the exception
  23. > has occurred.  This obviously makes the langauge, as defined in the
  24. > standard, unacceptable for use in the area of, say, embedded systems.
  25. > Even in scientific progrmming, however, one would like to be able to
  26. > throw an exception out of a matrix manipulation routine when the
  27. > underlying hardware detects a floating point exception, and polling
  28. > for such an occurrence would involve unacceptable overhead.
  29.  
  30. Are you sure that this is possible on the machines that you'd like
  31. your program to run on?  On many of today's RISC chips, after all,
  32. floating point exceptions are asynchronous: you have no way of
  33. knowing which instruction caused the problem.
  34.  
  35. (This sounds perverse, but there's a reason for it.  If you want
  36. synchronous exceptions, you end up having to stall the pipeline when
  37. you're processing a floating point instruction.)
  38. -- 
  39. Matt Austern
  40. SGI: MTI Compilers Group
  41. austern@isolde.mti.sgi.com
  42.